package com.demo.controller;

import com.demo.model.User;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Controller;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Admin
 * Date: 2023-02-09
 * Time: 17:16
 */
@Controller
public class StudentBeans {

    @Bean(name = "Student_user")
    public User user2() {

        User user = new User();
        user.setId(2);
        user.setName("StudentBeans:李四");
        user.setAge(20);

        return user;
    }
}
